<?
/**
 * redirect
 * 
 * @package  iforum.common  
 * @author   iCer <iCer@justdn.com>
 * @version  $Id: IforumRedirect.php,v 1.1 2005/04/06 04:07:55 icer Exp $
 */
 class IforumRedirect
 {
 	/**
 	 * @param $message string show message when redirecting
 	 * @param $target  string redirect url
 	 */
 	function go($message, $target)
 	{
 		$GLOBALS['iforum']['redirect']['message'] = $message;
 		$GLOBALS['iforum']['redirect']['target'] = $target;
 	}
 	
 	function needRedirect()
 	{
 		if (isset($GLOBALS['iforum']['redirect']['message']) && 
 			isset($GLOBALS['iforum']['redirect']['target']))
 		{
 			return true;
 		}
 		else 
 		{
 			return false;
 		}
 	}
 	
 	function getRedirectInfo()
 	{
 		return $GLOBALS['iforum']['redirect'];
 	}
 }


?>